﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="Danhsachdondathang.aspx.cs" Inherits="admin_Default" Title="Untitled Page" %>

<%-- Add content controls here --%><asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
<script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>
            
           
               
        <form id="form1" runat="server">
        <table style="width:100%;">
            <tr>
                <td style="text-align: center; width: 476px;">
                
                <table>
                    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
                    
                    <HeaderTemplate >
                    <tr>
                                <th>Mã Đơn Đặt Hàng</th>
							    <th>Tên Khách Hàng</th>
							    <th>Ngày Đặt Hàng</th>
							    <th>Tình Trạng</th>			
                    
                    </tr>
                    
                    </HeaderTemplate>
                    <ItemTemplate>
                    <tr>
                                <td><asp:HyperLink ID="hplmaddh" runat="server" NavigateUrl='<%# "HienThiChiTietDDH.aspx?maddh=" + DataBinder.Eval(Container.DataItem,"maddh")%>' Text='<%# DataBinder.Eval(Container.DataItem,"maddh")%>' /></td>
                                <td><%#Eval("tenkh")%></td>
							    <td><%#Eval("ngaydathang")%></td>
							    <td><%#Eval("tinhtrang")%></td>							
							    <td><asp:ImageButton ID="imagebtxoa" Width="20px" Height="20px" runat="server" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /><a href="SuaDonDatHang.aspx?maddh=<%#Eval("maddh")%>"><img src="images/action_check.png" alt="Check" /></a></td>
                    
                    
                    </tr>
                    
                    
                    
                    </ItemTemplate>
                    
                    </asp:Repeater>
                    </table>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                        SelectCommand="SELECT [MaDDH], [TenKH], [NgayDatHang], [TinhTrang] FROM [DonDatHang]">
                    </asp:SqlDataSource>
                    </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td style="width: 476px">
                    <asp:Repeater ID="Repeater2" runat="server">
                    </asp:Repeater>
                </td>
                <td style="width: 189px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            </table>
        </form>




</asp:Content>
